home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sol_exitdoor.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  109 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SOL_ExitDoor.cog
  4. #
  5. # Thank you.  Come again.
  6. #
  7. # [TRM]
  8. #
  9. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.  
  14.     message     startup
  15.     message     entered
  16.     
  17.     thing       player      local
  18.     thing       indy        local
  19.     
  20.     thing       exitCam
  21.     thing       fadeThing
  22.     thing       targ1
  23.     
  24.     thing       door
  25.     
  26.     sector      sec_Open
  27.     
  28.     sound       mus_Cue=mus_pyr_shinyobject.wav     local
  29.     
  30.     template    tpl_Actor=indy_sh_actor     local
  31.     
  32.     int         open=0          local
  33.         
  34. end
  35.  
  36. # ========================================================================================
  37.  
  38. code
  39.  
  40. startup:
  41.  
  42.     SetThingLight(door, '0.5 0.5 0.5', 0.001, 0.1);
  43.     SetThingAlpha(fadeThing, 0);
  44.     return;
  45.  
  46. # ========================================================================================
  47.  
  48. entered:
  49.  
  50.     player = GetLocalPlayerThing();
  51.     
  52.     if((GetSenderRef() == sec_Open) && (open == 0))
  53.     {
  54.         open = 1;
  55.         
  56.         # do cutscene stuff
  57.         MakeMeStop();
  58.         StartCutscene(2);
  59.         
  60.         # Cut to exitCam
  61.         SetCameraFocus(2, exitCam);
  62.         SetCameraSecondaryFocus(2, player);
  63.         SetCurrentCamera(2);
  64.         SetCameraFOV(90, 0, 0.0);
  65.             
  66.         # open the door
  67.         MoveToFrame(door, 1, 1.0);
  68.         #WaitForStop(door);
  69.         
  70.         # create indy actor
  71.         indy = CreateThing(tpl_Actor, player);
  72.         CaptureThing(indy);
  73.         
  74.         # outfit indy actor
  75.         CopyPlayerHolsters(player, indy);
  76.         
  77.         # hide player show actor
  78.         SetThingFlags(player, 0x80000);
  79.         ClearThingFlags(indy, 0x80000);
  80.         SetCameraSecondaryFocus(2, indy);
  81.         
  82.         # walk actor to target1
  83.         AISetMoveSpeed(indy, 1.0);
  84.         AISetLookThing(indy, targ1);
  85.         AISetMoveThing(indy, targ1, 0);
  86.         
  87.         PlaySoundLocal(mus_Cue, 1.0, 0.0, 0x0, 0);
  88.         
  89.         Sleep(4.5);
  90.         
  91.         ThingFadeAnim(fadeThing, 0, 1, 2.0, 0);
  92.         
  93.         Sleep(2.0);
  94.         
  95.         EndCutscene();
  96.         JonesEndLevel();
  97.         
  98.         # debug purposes only
  99.         #ClearActorFlags(player, 0x200000);
  100.         #SetCurrentCamera(1);
  101.     }
  102.     
  103.     return;
  104.         
  105. # ========================================================================================
  106.  
  107. end
  108.  
  109.